import Home from '../pages/Home'
import Welcome from '../pages/Home/Welcome'
import Workbench from '../pages/Home/Workbench'
import Goods from '../pages/Home/Goods'
import Manger from '../pages/Home/Goods/Manger'

const routes = [
    {
        path: '/home',
        component: Home,
        children: [{
            path: '/home/welcome',
            title: '管理员',
            component: Welcome
        }, {
            path: '/home/workbench',
            title: '工作台',
            component: Workbench
        }, {
            path: '/home/goods',
            title: '商品',
            component: Goods,
            children: [{
                path: '/home/goods/manger',
                title: '商品管理',
                component: Manger
            }, {
                from: '/home/goods',
                to: '/home/goods/manger'
            }]
        }, {
            from: '/home',
            to: '/home/welcome'
        }]
    }, {
        from: '/',
        to: '/home'
    }
]
export default routes